package org.example;

import java.io.*;
import java.util.HashMap;
import java.util.Map;

//2.5	获取部门信息(A05)
public class PostDemoA05 {

    public static void main(String[] args) {
        // 构建嵌套JSON结构
        Map<String, Object> data = new HashMap<>();
        data.put("id", "A05");
        data.put("deptid", "001");

        try {
// {"data":{"deptid":"001","id":"A05"},"openid":"000001","timestamp":"20250507150225"}
            String response = sendJsonPostRequest.sendJsonPostRequest(data);
            System.out.println("响应内容：\n" + response);
// {"errcode":"0","msg":"成功","data":[{"DeptID":"001","DeptName":"IE部","ParentID":"0"}]}
        } catch (Exception e) {
            e.printStackTrace();
        }
    }
}



